AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4

template = src/template
bin_PROGRAMS = $(template)
src_template_SOURCES = src/main.cpp

noinst_PROGRAMS = tests/template.test

noinst_LTLIBRARIES=tests/libgtest.la
tests_libgtest_la_CXXFLAGS=-isystem tests/gtest-1.7.0/include -isystem tests/gmock-1.7.0/include -I tests/gtest-1.7.0 -I tests/gmock-1.7.0
tests_libgtest_la_LDFLAGS=-lpthread
tests_libgtest_la_SOURCES= \
  tests/gtest-1.7.0/src/gtest-all.cc \
  tests/gmock-1.7.0/src/gmock-all.cc

tests_template_test_CXXFLAGS=-I tests/gtest-1.7.0/include -I tests/gmock-1.7.0/include -Wno-unused -DGTEST_TAP_PRINT_TO_STDOUT
tests_template_test_LDADD=tests/libgtest.la 
tests_template_test_SOURCES= \
  tests/gtest-tap-listener/samples/src/gtest_main.cc \
  tests/test.cpp

TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(top_srcdir)/tap-driver.sh

testdir = tests
TESTS_ENVIRONMENT = program=$(template) \
  testdir=$(top_srcdir)/$(testdir)
TESTS = \
  $(testdir)/test.test \
  $(testdir)/template.test
